<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 解构单层数组
        // let arr = ['张三','李四','王五','赵六'];
        // let [a,b,c,d,e = '默认值'] = arr ;
        // console.log(a,b,c,d,e);
        
        // 解构多层数组
        // let arr = ['张三','李四','王五','赵六',[1,2,3,4,5,6]];
        // let [a,b,c,d,[e,f,g,h,i,j]] = arr;
        // console.log(a,b,c,d,e,f,g,h);

        // 解构多层对象
        let obj = {name:'张三', age:18, hobby:'法外狂徒',obj2:{herght : '178cm'} };
        let {name,age,hobby,obj2} = obj;
        console.log(name,age,hobby,obj2);


    </script>
</body>
</html>